import { arc } from "@/utils/common"
export default class Ring {
  constructor(x, y, key, R, lineWidth, color = '#E5722E') {
    this.x = x
    this.y = y
    this.key = key
    this.R = R
    this.lineWidth = lineWidth
    this.color = color
  }

  draw(ctx) {
    ctx.beginPath()
    ctx.strokeStyle = this.color
    ctx.lineWidth = this.lineWidth * window.devicePixelRatio
    arc(ctx, this.x, this.y, this.R, 0, 2 * Math.PI)
    ctx.stroke()
  }

  deepCopy() {
    return new Ring(this.x, this.y, this.key)
  }
}